-- GENERATED SPELL FOR [Skettis Soulcaller] --


function spell0_21911(pUnit, Event) --@Call of the Grave,n/a--
pUnit:FullCastSpellOnTarget(5137,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21911', 2000, 1)
end

function spell1_21911(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20298,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21911', 3000, 1)
end

function spell2_21911(pUnit, Event) --@Slow,n/a--
pUnit:FullCastSpellOnTarget(38663,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21911', 12000, 1)
end

function Sorts_21911(pUnit, Event)
local choix_sorts_21911 = math.random(0, 2)
if choix_sorts_21911 == 0 then
pUnit:RegisterEvent('spell0_21911', 1, 1)
end
if choix_sorts_21911 == 1 then
pUnit:RegisterEvent('spell1_21911', 1, 1)
end
if choix_sorts_21911 == 2 then
pUnit:RegisterEvent('spell2_21911', 1, 1)
end
end

function mob21911_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21911', math.random(1500, 3000), 1)
end

function mob21911_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21911_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21911_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21911, 1, 'mob21911_Action')
RegisterUnitEvent(21911, 2, 'mob21911_Leave')
RegisterUnitEvent(21911, 3, 'mob21911_Kill')
RegisterUnitEvent(21911, 4, 'mob21911_Die')
